<?php
session_start();
$loginPath = "./login.html";
include "./inc/data/session.php";
include "inc/data/conn.php";


// 1903010227 查询学生
$sql = "select stuid,stuname,stuclass from linyr_stu where stuclass = ?";
if($stmt = $conn -> prepare($sql)){

	// 1903010227 绑定参数
	$stmt -> bind_param("s",$clName);

	// 1903010227 获取班级信息
	$clName = "19应用技术3-2班";

	// 1903010227 绑定结果
	$stmt -> bind_result($stuId,$stuName,$stuClass);

	// 1903010227 执行预处理查询
	$stmt -> execute();

	// 1903010227 获取所有信息
	$stmt -> store_result();
}else{
	echo "连接失败！";
};

// 1903010227 查询班级
$sql_1 = "select stuclass,majorname from linyr_stuclass where majorname = ?";
if($stmt_1 = $conn -> prepare($sql_1)){

	// 1903010227 绑定参数
	$stmt_1 -> bind_param("s",$major);

	// 1903010227 获取班级信息
	$major = "计算机应用技术";

	// 1903010227 绑定结果
	$stmt_1 -> bind_result($stuClass_1,$stuMajor);

	// 1903010227 执行预处理查询
	$stmt_1 -> execute();

	// 1903010227 获取所有信息
	$stmt_1 -> store_result();
	}
else{
	echo "连接失败!";
}


?>



<!DOCTYPE html>
<html>
<head>
	<title>首页</title>
	<link rel="stylesheet" type="text/css" href="inc/css/reset.css"  charset="UTF-8"/>
	
	<link rel="stylesheet" type="text/css" href="inc/css/index_style.css?15613145" charset="UTF-8"/>
	<script type="text/javascript" src="../inc/js/jz.js"></script>
</head>
<body>
<div id="max_id">
	<div id="main">
	<div id="header">
		<div id="logo">
			<a href="#">
				<img id="header_img" src="./inc/pic/index_logo.png" alt="">
			</a>
		</div>
		
		<div id="meun_header">
			
			<ul id="header_ul">
				<li>
					<a href="#">首页</a>
				</li>
				<li>
					<a href="#">学校概况</a>
				</li>
				<li>
					<a href="#">国际合作</a>
				</li>
				<li>
					<a href="#">院系部门</a>
				</li>
				<li>
					<a href="#">科学研究</a>
				</li>
				<li>
					<a href="#">教师队伍</a>
				</li>
				<li>
					<a href="#">人才培养</a>
				</li>
				<li>
					<a href="#">人才招聘</a>
				</li>
				<li>
					<a href="#">招生就业</a>
				</li>
				
			</ul>
			
			
		</div>
	</div>

<div id="centent">
	<div id="top-centent">
		<ul>
				<img src="inc/portrait/<?= $_SESSION["Pic"]?>"  width="20px" style="padding-bottom: 4px; padding-left: 8px;">
				<span style="font-size: 14px; padding-left: 10px;">您好!<span style="padding-left: 10px;"><?php echo $_SESSION["uName"]?></span></span>
			
			<li>
				<?php if($_SESSION["uRole"]==1){?>
				<p>工号：<?php echo $_SESSION["uId"]?></p>
				<?php }else{?>
					<p>学号：<?php echo $_SESSION["uId"]?></p>
				<?php }?>
			</li>
			
			<li>
				<p>系：<?php echo $_SESSION["uDep"]  ?></p>
			</li>
			<?php if($_SESSION["uRole"]!=1){?>
			<li>
				<p>班级：<?php echo $_SESSION["uStuclass"]?></p>
			</li>
			<?php }?>
		
			
		</ul>
	</div>
	<div id="content_1">
		<ul>
			<li>
				<a href="school/tScoreln.php">教师成绩录入</a>
			</li>
			<li>
				<a href="school/tTask.php">教学任务查询</a>
			</li>
			<li>
				<a href="#">学生成绩查询</a>
			</li>
			<li>
				<a href="#">学生课表查询</a>
			</li>
			<li>
				<a href="./school/user.php">用户设置</a>
			</li>
			<li>
				<a href="./school/userset.php">上传头像</a>
			</li>
			<li>
				<a href="#"></a>
			</li>
			<li id="zhuxiao">
				<a href="quit.php">注销</a>
			</li>
		</ul>
	</div>
	
	<div id="content_2">

		<?php $stmt -> bind_result($stuId,$stuName,$stuClass);
		$stmt -> execute(); 
		$stmt -> store_result(); ?>
		<?php if($stmt -> num_rows>0) { ?>
		<p>当前位置：学生首页</p>
			<div id="class">
			<form action="" method="post">
				<label>请选择班级：</label>
				<select>
					<?php while($stmt_1 -> fetch()){?>
					<option value ="" ><?php echo $stuClass_1 ?></option>
					<?php } ?>
				</select>
				<button type="submit" id="cha">查　询</button>
			</form>
			
		</div>
		
		<table border="1" cellspacing="" cellpadding="" id="biaoge">
			<tr>
				<td>序号</td>
				<td>班级</td>
				<td>学号</td>
				<td>姓名</td>
				<td>二级学院</td>
			</tr>
			<?php for($j=0;$stmt -> fetch() and $j <= $stmt -> num_rows;$j++){
				?>
				<tr>
					<td><?=$j+1?></td>
					<td><?=$stuClass?></td>
					<td><?=$stuId?></td>
					<td><?=$stuName?></td>
					<td>计算机学院</td>
				</tr>
				<?php 
				} 
				?>
			</table>
			<?php }
				else{echo "查询为空！";
			} ?>
	</div>
</div>
</div>


<div id="footer_1">
	  <div id="one">
	          
			<h3>学校概况</h3>
							
			<ul id="first">
				
				<li><a href="#" >学校简介</a> </li>
				
				<li><a href="#" >概况一览</a> </li>
				
				<li><a href="#" >学校历史</a> </li>
				
				<li><a href="#" >历任领导</a> </li>
				
				<li><a href="#" >现任领导</a> </li>
				
				<li><a href="#" >校长寄语</a> </li>
				
			</ul>
			<ul id="second" >
				
				<li><a href="#">学校标志</a> </li>
				
				<li><a href="#">老照片</a> </li>
				
				<li><a href="#" >校园导游</a> </li>
				
				<li><a href="#" >校园地图</a> </li>
				
				<li><a href="#">城市概览</a> </li>
				
				<li><a href="#">工大映像</a> </li>
				
			</ul>
	            
	          
		</div>

			  
			  
		<div id="two">
			  
			<h3>国际合作</h3>
							
			<ul>
				<li><a href="#" >交流概况</a> </li>	
				<li><a href="#" >国际合作</a> </li>	
				<li><a href="#" >国际学生</a> </li>
			</ul>

		</div>
		  
		<div id="three">
			  
			<h3>院系部门</h3>
			    	            
			<ul>
				
				<li><a href="#" >党群机构</a> </li>
				
				<li><a href="#" >管理与服务机构</a> </li>
				
				<li><a href="#" >教学与科研机构</a> </li>	
			</ul>
			    
			  
		</div>
			  
		<div id="four">
			  
			<h3>科学研究</h3>
			    	            
			<ul>
				
				<li><a href="#" >科学研究</a> </li>
				<li><a href="#" >学科专业</a> </li>
				<li><a href="#" >重点学科</a> </li>	
				<li><a href="#" >博士后</a> </li>	
				<li><a href="#" >学术期刊</a> </li>	
			</ul>
			    
			  
		</div>
			  
		<div id="five">
			  
			<h3>教师队伍</h3>
			    	            
			<ul>
				
				<li><a href="#" >总体介绍</a> </li>
				<li><a href="#" >接触人才</a> </li>
				<li><a href="#" >博士生导师</a> </li>	
				<li><a href="#" >教学带头人</a> </li>	
				<li><a href="#" >教师搜索</a> </li>	
			</ul>
		
			  
		</div>
		
		<div id="six">
			  
			<h3>人才培养</h3>
			    	            
			<ul>
				
				<li><a href="#" >人才培养概况</a> </li>
				<li><a href="#" >本科生教育</a> </li>
				<li><a href="#" >研究生教育</a> </li>	
				<li><a href="#" >国际学生教育</a> </li>	
				<li><a href="#" >继续教育</a> </li>	
				<li><a href="#" >奖贷学金</a> </li>
			
			</ul>
			   
			    
			  
		</div>
		
		<div id="seven">
			  
			<h3>人才招聘</h3>	            
			<ul>
				
				<li><a href="#" >青年科学家工作室学术带头人</a> </li>
				<li><a href="#" >引才计划青年项目</a> </li>
				<li><a href="#" >研究生教育</a> </li>	
				<li><a href="#" >青年拔尖人才及准聘岗教师</a> </li>	
				<li><a href="#" >优秀博士后</a> </li>	
				<li><a href="#" >应聘方式</a> </li>
			
			</ul>
			    
			  
		</div>
			  
		<div id="eight"> 
			  
			<h3>招生就业</h3>
			  		            
			<ul>
				
				<li><a href="#" >本科生招生</a> </li>
				<li><a href="#" >研究生招生</a> </li>
				<li><a href="#" >国际学生招生</a> </li>	
				<li><a href="#" >继续教育招生</a> </li>	
				<li><a href="#" >就业服务</a> </li>	
				
			
			</ul>
			    
			  
		</div>	

		<div id="nine">
			<form action="" metdod="" id="form">
				<select id="select">
					<option value ="">常用链接</option>
					<option value ="xiaoyiyuan"><a href="#">校医院</a></option>
					<option value ="hagongdabao"><a href="#">哈工大报</a></option>
					<option value ="hagongdabao"><a href="#">网络电视</a></option>
					<option value ="hagongdabao"><a href="#">学报编辑部</a></option>
					<option value ="hagongdabao"><a href="#">哈工大学报（社科版）</a></option>
				</select>
			</form>
			<form action="" metdod="" id="form">
				<select id="select_1">
					<option value ="">校门内部导航</option>
					<option value ="xiaoyiyuan"><a href="#">--党群机构--</a></option>
					<option value ="hagongdabao"><a href="#">学校办公室</a></option>
					<option value ="hagongdabao"><a href="#">组织部</a></option>
					<option value ="hagongdabao"><a href="#">宣传部/教师工作部</a></option>
					<option value ="hagongdabao"><a href="#">统战部</a></option>
				</select>
			</form>
		</div>
		<div id="ten">
			<ul id="ul_1">
				<li id="li_1" data-src="inc/pic/bottom_1.png" style="display: list-item; background-image: url(inc/pic/bottom_1.png);">
					<a href="#">哈尔滨工业大学（威海）</a></li>
	
			</ul>
			<ul id="ul_2">
				<li id="li_2"  data-src="inc/pic/bottom_2.png" style="display: list-item; background-image: url(inc/pic/bottom_2.png);"><a href="#">哈尔滨工业大学（深圳）</a></li>
			</ul>
		</div>
	
</div>
<div id="bottom">
	<ul>
		<li id="bottom_logo"><img  src="inc/pic/bottom_logo.png" ></li>
		<li><p>哈尔滨市南岗区西大直街92号 查号台：+86-451-86412114 P.C.:150001 Copyright © 2020  哈尔滨工业大学网络与信息中心 黑ICP备05006863号</p></li>
	</ul>
	
</div>
</body>
</html>